home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
batch
/
tsbat30
/
c.bat
< prev
next >
Wrap
DOS Batch File
|
1991-09-27
|
643b
|
31 lines
echo off
echo Lazy changing of directory
echo By Prof. Timo Salmi, ts@chyde.uwasa.fi, Fri 27-Sep-1991
echo.
rem If you are fed up with typing \ in changing the directory
rem this is the batch for you
rem E.g. if you have a directory \text\jokes\stupid the just use
rem c text jokes stupid
rem Applying c without parameters takes you to the root directory
set tmp_=
:_loop
set tmp_=%tmp_%\%1
shift
if not "%1"=="" goto _loop
if not "%tmp_%"=="\" if not exist %tmp_%\nul goto _error
echo Changing directory to %tmp_%
cd %tmp_%
goto _out
:_error
echo Directory %tmp_% does not exist
:_out
set tmp_=
echo on